{template 'common/header'}
<style>
.list li a{display:block; height:71px; padding:5px; border-bottom:1px #EEE solid; color:#333; overflow:hidden; text-decoration:none !important; position:relative;}
.list li a .thumb{width:80px; height:60px;}
.list li a .title{font-size:16px;}
.list li a .createtime{font-size:12px; color:#999; position:absolute; bottom:5px;}
.head{height:40px; line-height:40px; background:#2786fb; padding:0 5px; color:#FFF;}
.head .bn{display:inline-block; height:30px; line-height:30px; padding:0 10px; margin-top:4px; font-size:20px; border:1px #1176f2 solid; background:#3f95ff; color:#FFF; text-decoration:none;}
.head .bn.pull-right{position:absolute; right:5px; top:0;}
.head .title{font-size:14pt;display:block;padding-left:10px;font-weight:bolder;margin-right:49px;text-align:center;height:40px;line-height:40px;text-overflow:ellipsis;white-space:nowrap;overflow: hidden;}
.head .order{background:#F9F9F9; position:absolute; z-index:9999; right:0;}
.head .order li > a{display:block; padding:0 10px; min-width:100px; height:35px; line-height:35px; font-size:16px; color:#333; text-decoration:none; border-top:1px #EEE solid;}
.head .order li.fa-caret-up{font-size:20px;color:#F9F9F9;position:absolute;top:-11px;right:16px;}
.pager-position{width:100%;margin:0 auto;text-align:center;}
</style>
<div class="head">
	<a href="javascript:history.go(-1);" class="bn pull-left"><i class="fa fa-reply"></i></a>
	<span class="title">{$title}</span>
	<a href="javascript:;" id="category_show" class="bn pull-right"><i class="fa fa-reorder"></i></a>
	<ul class="list-unstyled order hide">
		<li class="fa fa-caret-up"></li>
		{php $categorys = site_category();}
			{loop $categorys $row}
				<li>
					<a href="{php echo url('site/site/list', array('cid' => $row['id']))}">
						{$row['name']}
					</a>
				</li>
				{if !empty($row['children'])}
					{loop $row['children'] $item}
						<li>
							<a href="{php echo url('site/site/list', array('cid' => $item['id']))}">
								{$item['name']}
							</a>
						</li>
					{/loop}
				{/if}
			{/loop}
	</ul>
</div>
<ul class="list list-unstyled">
	{php $result = site_article(array('cid' => $cid));}
	{loop $result['list'] $row}
	<li>
		<a href="{if !empty($row['linkurl'])}{$row['linkurl']}{else}{php echo murl('site/site/detail', array('id' => $row['id'], 'uniacid' => $_W['uniacid']))}{/if}">
			{if $row['thumb']}<img src="{$_W['attachurl']}{$row['thumb']}" class="pull-right thumb" onerror="this.parentNode.removeChild(this)" />{/if}
			<div class="title">{$row['title']}</div>
			<div class="createtime">{php echo date('Y-m-d H:i:s', $row['createtime'])}</div>
		</a>
	</li>
	{/loop}
</ul>
<script>
	require(['jquery'], function($){
		$(function(){
			$('#category_show').click(function(){
				$('.head .order').toggleClass('hide');
				return false;
			});
		});
	});
</script>
<div class="pager-position">{$result['pager']}</div>
{template 'common/footer'}